package jmetal.problems.ddtlz;

import jmetal.core.Problem;
import jmetal.encodings.solutionType.RealSolutionType;

@SuppressWarnings("serial")
public abstract class F extends Problem{
	private int cycle_ ; 
	
	/**
	 * according to Li Ke Yao Xin's paper of Dynamic Multi-Objective  
	 * @param numberOfVariables
	 * @param cycle 时钟序数
	 */
	public F(Integer numberOfVariables, Integer cycle){
		numberOfVariables_ = numberOfVariables;
		this.cycle_ = cycle;
		if(cycle_ == 0){
			numberOfObjectives_ = 3;
		}else if(cycle_>=1 && cycle_<=4){
			numberOfObjectives_ = 3 + cycle_;
		}else if(cycle_<=9 && cycle_>=5){
			numberOfObjectives_ = 11 - cycle_;
		}
		
	    numberOfConstraints_= 0;
	    problemName_        = "F";
	    
	    lowerLimit_ = new double[numberOfVariables_];
	    upperLimit_ = new double[numberOfVariables_];        
	    for (int var = 0; var < numberOfVariables; var++){
	      lowerLimit_[var] = 0.0;
	      upperLimit_[var] = 1.0;
	    } //for
	    
	    solutionType_ = new RealSolutionType(this) ;
	}
}
